<?php
	require_once('../includes/user.php');
	$user=new User();
	$pieces=explode(":", $_POST['id']);
	if($_POST['decision']=='1')
	{
		for($i=0;$i<$_POST['length'];$i++)
		{
			$id=$pieces[$i];
			$user->record['status']=1;
			$user->updateAcadAttenPoints($id);
			$user->update('points',"id='$id'");
		}
	}
	else if($_POST['decision']=='2')
	{
		for($i=0;$i<$_POST['length'];$i++)
		{
			$id=$pieces[$i];
			$user->record['status']=2;
			$user->update('points',"id='$id'");
		}
	}
	else if($_POST['decision']=='3')
	{
		$user->record['status']=1;
		$user->updateAcadAttenPoints($_POST['id']);
		$user->update('points',"id='$_POST[id]'");
	}
	else if($_POST['decision']=='4')
	{
		$user->record['status']=2;
		$user->update('points',"id='$_POST[id]'");
	}
?>